home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr27 / ms242.zip / ESPANOL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-12-15  |  3KB  |  137 lines

  1. /* ESPAÑOL.CMD: Instalación de MEMSIZE en español */
  2.  
  3. '@Echo Off'
  4.  
  5. /* Cargar REXXUTIL */
  6.  
  7. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  8. Call SysLoadFuncs
  9.  
  10.  
  11. /* Initialize */
  12.  
  13. Signal On Failure Name FAILURE
  14. Signal On Halt Name HALT
  15. Signal On Syntax Name SYNTAX
  16.  
  17. Call SysCls
  18. Say 'Instalación de MEMSIZE...'
  19. Say ''
  20.  
  21.  
  22. /* Verify the existence of the various component files. */
  23.  
  24. Language = 'ESPANOL'
  25.  
  26. Result = SysFileTree( 'MEMSIZE.EXE', 'Files', 'F' )
  27. If Files.0 = 0 Then
  28.   Do
  29.   Say 'ERROR: ¡No se encuentra el MEMSIZE.EXE!'
  30.   Signal DONE
  31.   End
  32.  
  33. Result = SysFileTree( Language".DLL", 'Files', 'F' )
  34. If Files.0 = 0 Then
  35.   Do
  36.   Say 'ERROR: ¡No se encuentra el 'Language'.DLL!'
  37.   Signal DONE
  38.   End
  39.  
  40. Result = SysFileTree( Language".HLP", 'Files', 'F' )
  41. If Files.0 = 0 Then
  42.   Do
  43.   Say 'ERROR: ¡No se encuentra el 'Language'.HLP!'
  44.   Signal DONE
  45.   End
  46.  
  47. /* Ask for the target directory name. */
  48.  
  49. Say 'Por favor, escriba el nombre completo del directorio en el'
  50. Say '  que quiere instalar el programa MEMSIZE (por defecto es C:\OS2\APPS): '
  51. Pull Directory
  52. If Directory = "" Then Directory = 'C:\OS2\APPS'
  53.  
  54.  
  55. /* Create the target directory if necessary. */
  56.  
  57. Result = SysFileTree( Directory, 'Dirs', 'D' )
  58. If Dirs.0 = 0 Then
  59.   Do
  60.   Result = SysMkDir( Directory )
  61.   if Result == 0 Then
  62.     Do
  63.     End
  64.   Else
  65.     Do
  66.     Say 'ERROR: No se puede crear el directorio destino.'
  67.     Signal DONE
  68.     End
  69.   End
  70. Say ''
  71.  
  72.  
  73. /* Ask for the target folder. */
  74.  
  75. Say "¿Quiere instalarlo de forma que se ejecute automáticamente al arrancar? (S/N)"
  76. Pull YesNo
  77. If YesNo = "S" Then
  78.   Do
  79.   Folder = '<WP_START>'
  80.   Say "El objeto se copiará en la carpeta Inicio."
  81.   End
  82. Else
  83.   Do
  84.   Folder = '<WP_DESKTOP>'
  85.   Say "El objeto se copiará en el Escritorio."
  86.   End
  87. Say ''
  88.  
  89.  
  90. /* Perform the installation. */
  91.  
  92. Say 'Copiando MEMSIZE al directorio ' Directory '...'
  93. Copy MEMSIZE.EXE Directory                  '1>NUL'
  94. Copy Language".DLL" Directory"\MEMSIZE.DLL" '1>NUL'
  95. Copy Language".HLP" Directory"\MEMSIZE.HLP" '1>NUL'
  96. Copy Language".DOC" Directory"\MEMSIZE.DOC" "1>NUL"
  97.  
  98. Result = SysFileTree( Language".INF", 'Files', 'F' )
  99. If Files.0 > 0 Then
  100.    Do
  101.    Copy Language".INF" Directory"\MEMSIZE.INF"  '1>NUL'
  102.    End
  103.  
  104. Result = SysFileTree( "SNAPSHOT.EXE", 'Files', 'F' )
  105. If Files.0 > 0 Then
  106.    Do
  107.    Copy "SNAPSHOT.EXE" Directory"\SNAPSHOT.EXE"  '1>NUL'
  108.    End
  109.  
  110. Say "Creando el objeto del programa..."
  111. Type = 'WPProgram'
  112. Title = 'Recursos del Sistema'
  113. Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\MEMSIZE.EXE;STARTUPDIR='Directory';OBJECTID=<MEMSIZE>;NOPRINT=YES;'
  114. Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  115.  
  116. If Result = 1 Then
  117.   Say "El objeto se ha creado.  Fin."
  118. Else
  119.   Say "ERROR: ¡No se ha podido crear el objeto!"
  120.  
  121. Signal DONE
  122.  
  123. FAILURE:
  124. Say 'Error del REXX.'
  125. Signal DONE
  126.  
  127. HALT:
  128. Say 'Se ha parado el REXX.'
  129. Signal DONE
  130.  
  131. SYNTAX:
  132. Say 'Error de síntaxis del REXX.'
  133. Signal DONE
  134.  
  135. DONE:
  136. Exit
  137.